<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>03-BOM顶级对象window</title>
</head>

<body>
  <script>
    // window.document.querySelector()
    var num = 10;
    console.log(num);
    // 调用时可以省略window
    // 方法与属性都是window下的
    // window.alert('你好')
    console.log(window.num);
    console.log(window.name);

  </script>
</body>

</html>